<!--{eval $_G[home_tpl_titles] = array($album[albumname], '{lang album}');}-->
<!--{if !$_GET['backend']}-->
    <!--{template common/header}-->
    <!--{if $_GET['op']=='edit' || $_GET['op']=='editpic'}-->
    <div id="pt" class="bm cl">
        <!--{subtemplate common/simplesearchform}-->
        <div class="z"><a href="./" class="nvhm" title="{lang homepage}">$_G[setting][bbname]</a> <em>&rsaquo;</em> <a href="home.php">$_G[setting][navs][4][navname]</a> <em>&rsaquo;</em> <a href="home.php?mod=space&do=album">{lang album}</a><!--{if $album[albumname]}--> <em>&rsaquo;</em> <a href="home.php?mod=space&uid=$album[uid]&do=album&id=$albumid">$album[albumname]</a><!--{/if}--> <em>&rsaquo;</em> {lang edit_album}</div>
    </div>
    <div id="ct" class="wp cl woo-bg-st">
        <div class="mn z woomar sitewitdh">
            <div class="bm bw0">
                <ul id="woogtv" class="tb cl">
                    <!--{eval $aid = $albumid ? $albumid : -1;}-->
                    <li><a href="home.php?mod=space&uid=$album[uid]&do=album&id=$aid">{lang view_album}</a></li>
                    <!--{if $aid > 0}-->
                    <li{if $_GET['op']=='edit'} class="a"{/if}><a href="home.php?mod=spacecp&ac=album&op=edit&albumid=$albumid">{lang edit_album_information}</a></li>
                    <!--{/if}-->
                    <li{if $_GET['op']=='editpic'} class="a"{/if}><a href="home.php?mod=spacecp&ac=album&op=editpic&albumid=$albumid">{lang edit_pic}</a></li>
                    <li class="y"><a href="home.php?mod=space&uid=$album[uid]&do=album&view=me">&laquo; {lang back_album_list}</a></li>
                </ul>
    <!--{/if}-->
<!--{else}-->
<!--{template common/header_ajax}-->
<!--{/if}-->
    <!--{if $_GET['op'] == 'edit'}-->
                <form method="post" autocomplete="off" id="theform" name="theform" action="home.php?mod=spacecp&ac=album&op=edit&albumid=$albumid">
                    <table cellspacing="0" cellpadding="0" class="tfm">
                        <tr>
                            <th><label for="albumname">{lang album_name}</label></th>
                            <td><input type="text" id="albumname" name="albumname" value="$album[albumname]" size="20" class="px" /></td>
                        </tr>
                        <tr>
                            <th><label for="depict">{lang album_depict}</label></th>
                            <td><textarea name="depict" id="depict" class="pt" cols="40" rows="3">$album[depict]</textarea></td>
                        </tr>
                        <!--{if $categoryselect}-->
                        <tr>
                            <th>{lang site_categories}</th>
                            <td>
                                $categoryselect
                                ({lang select_site_album_categories})
                            </td>
                        </tr>
                        <!--{/if}-->
                        <tr>
                            <th>{lang privacy_settings}</th>
                            <td>
                                <select name="friend" onchange="passwordShow(this.value);" class="ps">
                                    <option value="0"$friendarr[0]>{lang friendname_0}</option>
                                    <option value="1"$friendarr[1]>{lang friendname_1}</option>
                                    <option value="2"$friendarr[2]>{lang friendname_2}</option>
                                    <option value="3"$friendarr[3]>{lang friendname_3}</option>
                                    <option value="4"$friendarr[4]>{lang friendname_4}</option>
                                </select>
                            </td>
                        </tr>
                        <tbody id="span_password" style="$passwordstyle">
                            <tr>
                                <th>{lang password}</th>
                                <td><input type="text" name="password" value="$album[password]" size="10" class="px" /></td>
                            </tr>
                        </tbody>
                        <tbody id="tb_selectgroup" style="$selectgroupstyle">
                            <tr>
                                <th>{lang specified_friends}</th>
                                <td>
                                    <select name="selectgroup" onchange="getgroup(this.value);" class="ps">
                                        <option value="">{lang from_friends_group}</option>
                                        <!--{loop $groups $key $value}-->
                                        <option value="$key">$value</option>
                                        <!--{/loop}-->
                                    </select>
                                    <p class="d">{lang choices_following_friends_list}</p>
                                </td>
                            </tr>
                            <tr>
                                <th>&nbsp;</th>
                                <td>
                                    <textarea name="target_names" id="target_names" rows="3" class="pt">$album[target_names]</textarea>
                                    <p class="d">{lang friend_name_space}</p>
                                </td>
                            </tr>
                        </tbody>
                        <tr>
                            <th>&nbsp;</th>
                            <td>
                                <input type="hidden" name="referer" value="{echo dreferer()}" />
                                <input type="hidden" name="editsubmit" value="true" />
                                <button name="submit" type="submit" class="pn" value="true"><strong>{lang determine}</strong></button>
                            </td>
                        </tr>
                        <tr>
                            <th>&nbsp;</th>
                            <td><a href="home.php?mod=spacecp&ac=album&op=delete&albumid=$album[albumid]&handlekey=delalbumhk_{$album[albumid]}" id="album_delete_$album[albumid]" onclick="showWindow(this.id, this.href, 'get', 0);">{lang delete_album}</a></td>
                        </tr>
                    </table>
                    <input type="hidden" name="formhash" value="{FORMHASH}" />
                </form>
    <!--{elseif $_GET['op'] == 'editpic'}-->
    	<!--{if !$_GET['backend']}-->
        		<script type="text/javascript" reload="1">
					var list_ftag 	= new Array();
					var picObj		= new Array();
                </script>
        		<script type="text/javascript" src="{$_G[setting][jspath]}handlers.js?{VERHASH}"></script>
                <form method="post" autocomplete="off" id="theform" name="theform" action="home.php?mod=spacecp&ac=album&op=editpic&albumid=$albumid">
					<p class="d">{lang album_cover_notice}</p>
                    <div class="tfm up_row mbm">
						<ul id="feed_div"  class="imgboxupload">
                        <!--{eval $common = '';}-->
       	<!--{/if}-->
				<!--{if $list}-->
					<!--{loop $list $value}-->
					<li class="li_box" id="picobj_{$value[picid]}">
                    	<img src="$value[pic]" class="boxximg" />
                        <div id="c_1_{$value[picid]}" class="textareabox boxdisp1 s11">Nhấn vào đây và nhập tên tài khoản của bạn bè có mặt trong ảnh này, mỗi tài khoản cách nhau bởi dấu phẩy "," hoặc Enter!, tối đa không quá 15 người. Lưu ý: Người được tag có thể tự huỷ tag của họ khỏi ảnh.</div>
                        <div id="i_1_{$value[picid]}_menu" style="display: none;"><ul id="friends_{$value[picid]}" class="box_friend_type"></ul></div>
                        <div id="c_1_1_{$value[picid]}" class="input un_selector inputuser">
                        <input id="i_1_{$value[picid]}" class="inputf" /></div>
                        <div id="c_2_{$value[picid]}" class="textareabox boxdisp2">Hãy nhập vào địa danh nơi bạn chụp ảnh này...</div>
                        <input class="input" id="i_2_{$value[picid]}" name="location[{$value[picid]}]" value="{$value[location]}" />
                        <input class="hidden" name="oldlocation[{$value[picid]}]" value="{$value[location]}" />
                        <div id="c_3_{$value[picid]}" class="textareabox comment">{if $value[title]}$value[title]{else}Hãy viết gì đó về bức hình này...{/if}</div>
                        <textarea name="title[{$value[picid]}]" id="i_3_{$value[picid]}">$value[title]</textarea>
                        <input type="hidden" name="oldtitle[{$value[picid]}]" value="$value[title]"  />
                        <input type="hidden" name="oldFriendsTag[{$value[picid]}]" value="{$value[oldFriendsTag]}" />
                        <div class="boxcontrol"><a href="javascript:void(0);" id="a_1_{$value[picid]}" class="bxa_btn a_1" title="Thêm những người bạn có mặt trong ảnh này">{$value['tagcount']}</a><a href="javascript:void(0);" id="a_2_{$value[picid]}" class="bxa_btn a_2" title="Hãy nhập vào địa danh nơi bạn chụp ảnh này...">&nbsp;</a><a href="javascript:void(0);"  id="a_3_{$value[picid]}" class="bxa_btn a_3" title="Viết bình luận cho hình ảnh này">&nbsp;</a><!--{if $album[albumname]}--><a href="home.php?mod=spacecp&ac=album&op=setpic&albumid=$value[albumid]&picid=$value[picid]&handlekey=setpichk" id="a_picid_$value[picid]" onclick="showWindow('setpichk', this.href, 'get', 0)" title="{lang set_to_conver}" class="a_unact_sel">&nbsp;</a><!--{/if}--><input style="margin-top:4px;" type="checkbox" name="ids[{$value[picid]}]" value="{$value[picid]}" {$value[checked]} class="pc y" title="Chọn để xoá nhiều hoặc di chuyển"><a href="javascript:void(0);" class="a_delete_sel y" id="ic_d_$value[picid]" title="Xoá ảnh này">&nbsp;</a><a class="bxa_btn y" style="border:0" href="javascript:void(0);" id="showSelectBox_{$value[picid]}" title="Danh sách bạn của tôi"><img src="{IMGDIR}/contact-list.png" style="margin-top:3px; border:0"/></a></div>
                        <div id="showSelectBox_{$value[picid]}_menu" class="showSelectBox_menu p_pof box_friend_selector" unselectable="on" style="display:none;">
                        	<div id="selBox_{$value[picid]}" class="ptn pbn selBox"><ul id="selectorBox_{$value[picid]}" class="xl xl2 cl"></ul></div>
                        	<div class="cl"><button type="button" class="y pn" onclick="myFSs[{$value[picid]}].showPMFriend('showSelectBox_{$value[picid]}_menu','selectorBox_{$value[picid]}', $('showSelectBox_{$value[picid]}'));doane(event)"><span>Đóng</span></button>
                            </div>
                        </div>
					</li>
                    <script type="text/javascript" reload="1">
							box_action_$value[picid] = new Box_act($value[picid]);
							list_ftag[{$value[picid]}] = {{$value['lisftagdata']}};
							var picObjMore = ["{$value['picid']}"];
							var picObj = picObj.concat(picObjMore);
                    </script>
					<!--{/loop}-->
				<!--{/if}-->
		<!--{if !$_GET['backend']}-->
        	</ul>
					</div>
            <!--{if $multi}-->
            <div id="load_more"></div>
        	<div id="loading_more_feed" style="display:none"></div>
            <!--{/if}-->
            <div class="x" style="padding:15px;">
            	<button type="submit" name="editpicsubmit" value="true" class="pn pnc btn_new" onclick="this.form.action+='&subop=update';"><strong>{lang update_explain_album}</strong></button>
            </div>
            <div class="y" style="padding:15px;">
                <label for="chkall" onclick="checkAll(this.form, 'ids')"><input type="checkbox" name="chkall" id="chkall" class="pc" />{lang select_all}</label> 
                <button type="submit" name="editpicsubmit" value="true" class="pn" onclick="this.form.action+='&subop=delete';return ischeck('theform', 'ids')"><strong>{lang delete_pics_selec}</strong></button>
                <!--{if $albumlist}-->
                <button type="submit" name="editpicsubmit" value="true" class="pn" onclick="this.form.action+='&subop=move';return ischeck('theform', 'ids')"><strong>{lang move_pics_to}</strong></button>
                <select name="newalbumid" class="ps vm">
                <!--{loop $albumlist $key $value}-->
                <!--{if $albumid != $value[albumid]}--><option value="$value[albumid]">$value[albumname]</option><!--{/if}-->
                <!--{/loop}-->
                <!--{if $albumid>0}--><option value="0">{lang default_album}</option><!--{/if}-->
                </select>
                <!--{/if}-->
                </div>
                <div class="y">
                	<p class="d">{lang delete_pic_notice}</p>
                </div>
				<input type="hidden" name="page" value="$page" />
				<input type="hidden" name="editpicsubmit" value="true" />
				<input type="hidden" name="formhash" value="{FORMHASH}" />
			</form>
            
			<script type="text/javascript">
				<!--{if $multi}-->
					var loadfeed = true;
					var url = 'home.php?mod=spacecp&ac=album&op=editpic&albumid=$aid' ;
				<!--{/if}-->
				function succeedhandle_setpichk(url, msg, values) {
					for(var id in picObj) {
						$('a_picid_' + picObj[id]).title = "{lang set_to_conver}";
						$('a_picid_' + picObj[id]).className = "a_unact_sel";
					}
					if(values['picid']) {
						$('a_picid_' + values['picid']).title = "{lang cover_pic}";
						$('a_picid_' + values['picid']).className = "a_acted_sel";
					}
				}
			</script>
		<!--{/if}-->
    <!--{elseif $_GET['op'] == 'delete'}-->
        <h3 class="flb">
            <em>{lang delete_album}</em>
            <!--{if $_G[inajax]}--><span><a href="javascript:;" onclick="hideWindow('$_G[gp_handlekey]');" class="flbc" title="{lang close}">{lang close}</a></span><!--{/if}-->
        </h3>
        <form method="post" autocomplete="off" id="theform" name="theform" action="home.php?mod=spacecp&ac=album&op=delete&albumid=$albumid&uid=$_G[gp_uid]">
            <input type="hidden" name="referer" value="{echo dreferer()}" />
            <input type="hidden" name="deletesubmit" value="true" />
            <input type="hidden" name="formhash" value="{FORMHASH}" />
            <div class="c">
                <p>{lang delete_album_message}</p>
                <p>
                    {lang the_album_pic}:
                    <select name="moveto" class="ps">
                        <option value="-1">{lang completely_remove}</option>
                        <option value="0">{lang move_to_default_album}</option>
                        <!--{loop $albums $value}-->
                        <option value="$value[albumid]">{lang move_to} $value[albumname]</option>
                        <!--{/loop}-->
                    </select>
                </p>
            </div>
            <p class="o pns">
                <button type="submit" name="submit" class="pn pnc" value="true"><strong>{lang determine}</strong></button>
            </p>
        </form>
    <!--{elseif $_GET['op'] == 'edittitle'}-->
        <h3 class="flb">
            <em id="return_$_G[gp_handlekey]">{lang edit_description}</em>
            <!--{if $_G[inajax]}--><span><a href="javascript:;" onclick="hideWindow('$_G[gp_handlekey]');" class="flbc" title="{lang close}">{lang close}</a></span><!--{/if}-->
        </h3>
        <form id="titleform" name="titleform" action="home.php?mod=spacecp&ac=album&op=editpic&subop=update&albumid=$pic[albumid]" method="post" autocomplete="off" {if $_G[inajax]}onsubmit="ajaxpost(this.id, 'return_$_G[gp_handlekey]');"{/if}>
            <input type="hidden" name="referer" value="{echo dreferer()}" />
            <input type="hidden" name="formhash" value="{FORMHASH}" />
            <input type="hidden" name="editpicsubmit" value="true" />
            <!--{if $_G[inajax]}--><input type="hidden" name="handlekey" value="$_G[gp_handlekey]" /><!--{/if}-->
            <div class="c">
                <textarea name="title[{$pic[picid]}]" cols="50" rows="7" class="pt">$pic[title]</textarea>
            </div>
            <p class="o pns">
                <button type="submit" name="editpicsubmit_btn" class="pn pnc" value="true"><strong>{lang update}</strong></button>
            </p>
        </form>
        <script type="text/javascript">
            function succeedhandle_$_G['gp_handlekey'] (url, message, values) {
                $('$_G[gp_handlekey]').innerHTML = values['title'];
            }
        </script>
    <!--{elseif $_GET[op] == 'edithot'}-->
        <h3 class="flb">
            <em>{lang adjust_hot}</em>
            <!--{if $_G[inajax]}--><span><a href="javascript:;" onclick="hideWindow('$_G[gp_handlekey]');" class="flbc" title="{lang close}">{lang close}</a></span><!--{/if}-->
        </h3>
        <form method="post" autocomplete="off" action="home.php?mod=spacecp&ac=album&op=edithot&picid=$picid">
            <input type="hidden" name="referer" value="{echo dreferer()}" />
            <input type="hidden" name="hotsubmit" value="true" />
            <input type="hidden" name="formhash" value="{FORMHASH}" />
            <div class="c">
                {lang new_hot}:<input type="text" name="hot" value="$pic[hot]" size="10" class="px" />
            </div>
            <p class="o pns">
                <button type="submit" name="btnsubmit" value="true" class="pn pnc"><strong>{lang determine}</strong></button>
            </p>
        </form>
    <!--{/if}-->
<!--{if !$_GET['backend']}-->
    <!--{if $_GET['op']=='edit' || $_GET['op']=='editpic'}-->
            </div>
        </div>
    </div>
    <!--{/if}-->
	<!--{template common/footer}-->
<!--{else}-->
	<!--{template common/footer_ajax}-->
<!--{/if}--> 